package com.abysscore.yachtdesign;

import java.awt.Color;

public class TFREESubdivisionLayer {
	private TFreeSubdivisionSurface FOwner; // Pointer to the subdivisionsurface
	private int FLayerID;              // Unique identification number for internal references
	private Color FColor;               // Color of this layer
	private boolean FVisible;              // Visibility switch
	private String FDescription;               // Description of the layer, used as user identification
	private boolean FSymmetric;              // Symmetric patches are mirrored in the centerplane when both halves of the ship are drawn
	private boolean FDevelopable;              // Developable layers are shaded with Gauss curvature
	private boolean FUseForIntersections;              // If set to true, stations, waterlines, buttocks and diagonals are calculated
	private boolean FUseInHydrostatics;              // If set to true, the panels of this layer will be used for hydrostatic calculations
	private boolean FShowInLinesplan;              // Flag to hide or show this layer in the linesplan
	private double FMaterialDensity;           // Density of material used to calculate the weight of the surface
	private double FThickness;           // Also used for weight calculation
	private TFasterList FPatches;          // List containing all controlpatches
	private byte FAlphaBlend;
	
	private Color FGetColor()
	{
		return FColor;
	}
	private int FGetCount()
	{
		return 0;
	}
	private String FGetDXFLayername()
	{
		return null;
	}
	private String FGetName()
	{
		return null;
	}
	private TFreeSubdivisionControlFace FGetItems(int Index)
	{
		return null;
	}
	
	private int FGetLayerIndex()
	{
		return 0;
	}
	private TLayerProperties FGetSurfaceProperties()
	{
		return null;
	}
	private void FSetFDevelopable(boolean Val)
	{
		FDevelopable = Val;
	}
	private void FSetName(String Val)
	{
		;//TODO
	}
	private void FSetColor(Color Val)
	{
		FColor = Val;
	}
	private void FSetShowInLinesplan(boolean val)
	{
		FShowInLinesplan = val;
	}
	private void FSetUseInHydrostatics(boolean val)
	{
		FUseInHydrostatics = val;
	}
	private void FSetUseForIntersections(boolean val)
	{
		FUseForIntersections = val;
	}
	private void FSetVisible(boolean Val)
	{
		FVisible = Val;
	}
	private void FSetSymmetric(boolean Val)
	{
		FSymmetric = Val;
	}

	public void AddControlFace(TFreeSubdivisionControlFace ControlFace)
	{
		;
	}
	public void AssignProperties(TFREESubdivisionLayer Source)
	{
		;
	}
	public boolean CalculateIntersectionPoints(TFREESubdivisionLayer Layer)
	{
		return false;
	}
    public TFREESubdivisionLayer(TFreeSubdivisionSurface Owner)
    {
    	
    }
    //procedure Clear;
    public boolean Delete()
    {
    	return false;
    }
    public void DeleteControlFace(TFreeSubdivisionControlFace ControlFace)
    {
    	;
    }
    //destructor Destroy;                                                                    override;
    public void Draw(TFreeViewport Viewport)
    {
    	;
    }
    public void Extents(T3DCoordinate Min, T3DCoordinate Max)
    {
    	;
    }
    public void LoadBinary(TFreeFileBuffer Source)
    {
    	int I=0;

    	Source.Load(FDescription);
    	Source.Load(FLayerID);
    	if (FLayerID>FOwner.LastusedLayerID())
    	{
    		FOwner.LastusedLayerID(FLayerID);
    		Source.Load(FColor);
    		Source.Load(FVisible);
    		Source.Load(FSymmetric);
    		Source.Load(FDevelopable);
    		FMaterialDensity=0.0;
    		FThickness=0.0;
    		FUseForIntersections=true;
    		FUseInHydrostatics=true;
    		FShowInLinesplan=true;
    		if (Source.Version().compareTo(TFreeFileVersion.fv180)>=0)
    		{
    			Source.Load(FUseForIntersections);
    			Source.Load(FUseInHydrostatics);
    			if (Source.Version().compareTo(TFreeFileVersion.fv191)>=0)
    			{
    				Source.Load(FMaterialDensity);
    				Source.Load(FThickness);
    				if (Source.Version().compareTo(TFreeFileVersion.fv201)>=0)
    				{
    					Source.Load(FShowInLinesplan);
    					if (Source.Version().compareTo(TFreeFileVersion.fv260)>=0)
        				{
    						Source.Load(I);
    						FAlphaBlend=(byte)I;
        				}
    				}
    			}
    		}
    	}
    }
    public void LoadFromStream(int LineNr, TStringList Strings)
    {
    	;
    }
    public void MoveDown()
    {
    	;
    }
    public void MoveUp()
    {
    	;
    }
    public void SaveToDXF(TStringList Strings)
    {
    	;
    }
    public void SaveBinary(TFreeFileBuffer Destination)
    {
    	;
    }
    public void SaveToStream(TStringList Strings)
    {
    	;
    }
    public void Unroll(TFasterList Destination)
    {
    	;
    }

    //
    public byte AlphaBlend()
    {
    	return FAlphaBlend;
    }
    public void AlphaBlend(byte val)
    {
    	FAlphaBlend = val;
    }
    
    public Color Color()
    {
    	return FGetColor();
    }
    public void Color(Color val)
    {
    	FSetColor(val);
    }
    
    //
    public int Count()
    {
    	return FGetCount();
    }
    
    //
    public boolean Developable()
    {
    	return FDevelopable;
    }
    public void Developable(boolean val)
    {
    	FSetFDevelopable(val);
    }
    
    //
    public String DXFLayername()
    {
    	return FGetDXFLayername();
    }
    
    //
    public TFreeSubdivisionControlFace Items(int Index)
    {
    	return FGetItems(Index);
    }
    
    //
    public int LayerID()
    {
    	return FLayerID;
    }
    public void LayerID(int val)
    {
    	FLayerID = val;
    }
    
    //
    public int LayerIndex()
    {
    	return FGetLayerIndex();
    }
    
    //
    public double MaterialDensity()
    {
    	return FMaterialDensity;
    } 
    public void MaterialDensity(double val)
    {
    	FMaterialDensity = val;
    }
    
    //
    public String Name()
    {
    	return FGetName();
    }
    public void Name(String val)
    {
    	FSetName(val);
    }

    
    //
    public TFreeSubdivisionSurface Owner()
    {
    	return FOwner;
    }
    public void Owner(TFreeSubdivisionSurface val)
    {
    	FOwner = val;
    }
    
    //
    public boolean ShowInLinesplan()
    {
    	return FShowInLinesplan;
    }
    public void ShowInLinesplan(boolean val)
    {
    	FSetShowInLinesplan(val);
    }
    
    //
    public TLayerProperties SurfaceProperties()
    {
    	return FGetSurfaceProperties();
    }
    
    //
    public boolean Symmetric()
    {
    	return FSymmetric;
    }
    public void Symmetric(boolean val)
    {
    	FSetSymmetric(val);
    }
    
    //
    public double Thickness()
    {
    	return FThickness;
    }
    public void Thickness(double val)
    {
    	FThickness = val;
    }
    
    //
    public boolean UseInHydrostatics()
    {
    	return FUseInHydrostatics;
    }
    public void UseInHydrostatics(boolean val)
    {
    	FSetUseInHydrostatics(val);
    }
    
    //
    public boolean UseForIntersections()
    {
    	return FUseForIntersections;
    }
    public void UseForIntersections(boolean val)
    {
    	FSetUseForIntersections(val);
    }
    
    //
    public boolean Visible()
    {
    	return FVisible;
    }
    public void Visible(boolean val)
    {
    	FSetVisible(val);
    }
}
